package atmgui;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

/**
 * 转账
 */

public class TransferPanel extends JPanel implements ActionListener {
    private ATM05 atm05;
    private Font font =new Font("宋体",Font.PLAIN,25);
    private JButton surebtn=new JButton(new ImageIcon("src/images/buttonSure.jpg"));
    private JButton offbtn=new JButton(new ImageIcon("src/images/buttonOff.jpg"));

    public  TransferPanel(ATM05 atm05){


        JLabel label=new JLabel("请输入对方账户");
        label.setBounds(100,200,300,50);
        label.setFont(font);//字体大小
        label.setForeground(Color.BLUE);//字体颜色


        JLabel label1=new JLabel("请输入金额");
        label1.setBounds(100,300,300,50);
        label1.setFont(font);//字体大小
        label1.setForeground(Color.BLUE);//字体颜色

        //文本框组件
        JTextField usrTextField=new JFormattedTextField();
        usrTextField.setBounds(300,200,300,50);


        JTextField usrTextField1=new JFormattedTextField();
        usrTextField1.setBounds(300,300,300,50);

        surebtn.setBounds(250,400,140,50);
        surebtn.addActionListener(this);


        offbtn.setBounds(500,400,140,50);
        offbtn.addActionListener(this);

        this.add(offbtn);




        this.add(surebtn);
        this.add(label);
        this.add(usrTextField);
        this.add(label1);
        this.add(usrTextField1);















        this.atm05=atm05;
        this.setLayout(null);
        this.setOpaque(false);






    }

    @Override
    public void actionPerformed(ActionEvent e) {
        atm05.showPanel("menu");


    }
}
